package cn.cau.service.impl;

import cn.cau.dao.CodeManageDao;
import cn.cau.dao.CodeRuleDao;
import cn.cau.entity.AuditingApplyRecord;
import cn.cau.entity.AuditingResult;
import cn.cau.entity.CodeManageRecord;
import cn.cau.service.AuditingInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AuditingInfoServiceImpl implements AuditingInfoService {

    @Autowired
    CodeManageDao codeManageDao;

    @Autowired
    CodeRuleDao codeRuleDao;

    @Override
    public int updateManageTable(AuditingResult auditingResult) {
        return codeManageDao.updateManageApplication(auditingResult);
    }

    @Override
    public int updateCodeTable(AuditingResult auditingResult) {
        return codeRuleDao.updateCodeRuleResult(auditingResult);
    }

    @Override
    public CodeManageRecord getRecordById(int id) {
        return codeManageDao.findRecordByManageId(id);
    }
}
